From: Florian Müllner Date: Tue, 13 Oct 2015 15:38:26 +0000 (+0200) Subject: dash: Ensure style for icon size computation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1139 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=14c52bb00a9748f9ae2c0f13bcb17fb460d975a1;p=gnome-shell.git dash: Ensure style for icon size computation StIcon will skip loading the texture when its theme node is unset (which may happen on style changes while the widget is hidden). While our size request to compute the dash icon size will create the icon's theme node if necessary (and of all its parents), a missing texture can still throw off our computation. Make sure this doesn't happen by ensuring the icon's style first, so the texture is updated in response to StWidget::style-changed if necessary. https://bugzilla.gnome.org/show_bug.cgi?id=745649 --- diff --git a/js/ui/dash.js b/js/ui/dash.js index e809f87ab..db23a3b66 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -647,6 +647,7 @@ const Dash = new Lang.Class({ let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; // Enforce the current icon size during the size request + firstIcon.icon.ensure_style(); let [currentWidth, currentHeight] = firstIcon.icon.get_size(); firstIcon.icon.set_size(this.iconSize * scaleFactor, this.iconSize * scaleFactor); [minHeight, natHeight] = firstButton.get_preferred_height(-1);